<?php
namespace Wechat\Controller;

class NoticeController extends CommonController
{
    public function lists()
    {
		$this->assign('pagemark', 'notice');
        $this->display();
    }

    public function view()
    {
		$this->assign('pagemark', 'notice');
        $this->display();
    }
	 // ajax文章列表
    public function ajax_notice_list()
    {
        $p        = I('get.p', '1', 'intval');
        $startrow = ($p - 1) * 5;
        $this->assign(compact('startrow'));
        $html = $this->fetch('ajax_notice_list');
        if (substr($html,-13) == '<!--empty -->') {
            $this->ajaxReturn(0, '没有数据');
        }
        $this->ajaxReturn(1, '', array(
            'html'    => $html,
            'loadurl' => query_url('ajax_notice_list', array('p' => $p + 1), '', true),
        ));
    }
}
?>